﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GiftsAdd.aspx.cs" Inherits="Comod_GiftsAdd" %>
<html>
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/submit.js"></script>
    <script type="text/javascript">
     function dispAdd()
     {
        document.getElementById("flag").style.display="none";
     }
     
      function account()
        {
            var sl=document.getElementById("txtNum").value;
            var dj=document.getElementById("txtCmoney").value;
        
             if(isNaN(sl))
            {
              alert("数量格式有误，必须由数字组成");
            }
            else if(isNaN(dj))
            {
                alert("单价格式有误,必须由数字组成");
            }       
            else if(sl!=""&&dj!=""&&!isNaN(sl)&&!isNaN(dj))
            {
                document.getElementById("txtToTal").innerText=sl*dj;
               
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table width="99%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="31" height="22">
                        <img src="../images/module.gif" width="20" height="22"></td>
                    <td style="width: 335px">
                        <asp:Label ID="lblPath" runat="server"></asp:Label></td>
                    <td width="990" align="right">
                      <font color="red"> [ <a href="javascript:location.href=document.referrer;" ><font color="red">返回</font></a>
                          ]</font>
                  </td>
                </tr>
            </table>
            <table width="99%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td bgcolor="#3CB6E5" height="5px">
                    </td>
                </tr>
            </table>
            <table width="99%"  border="0" cellpadding="1" cellspacing="1" class="tabGg">
                <tr>
                    <th width="169" bgcolor="#FFFFFF" class="r_bg" style="width: 167px" >
                        礼品名称：</th>
                    <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                  <asp:TextBox ID="txtName" runat="server" CssClass="input1" check_null="供货商不能为空"></asp:TextBox>
                        <asp:Label ID="Label2" runat="server" ForeColor="Red"></asp:Label></td>
                </tr>
                <tr>
                    <th bgcolor="#FFFFFF" class="r_bg" style="width: 167px" >
                        数 &nbsp;&nbsp; 量：
                    </th>
                    <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                        <input id="txtNum" onfocus="if(this.value==0)this.value=''" onblur="if(this.value=='')this.value=0" onkeyup="account()" runat="server" type="text" class="input1" value="0" /></td>
                </tr>
                <tr>
                    <th bgcolor="#FFFFFF" class="r_bg" style="width: 167px" >
                        单 &nbsp;&nbsp; 价：
                    </th>
                    <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                        <input id="txtCmoney" onfocus="if(this.value==0)this.value=''" onblur="if(this.value=='')this.value=0" onkeyup="account()"  runat="server" type="text" class="input1" value="0" /></td>
                </tr>
                <tr>
                    <th bgcolor="#FFFFFF" class="r_bg" style="width: 167px" >
                        金 &nbsp;&nbsp; 额：
                    </th>
                    <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                        <input id="txtToTal" runat="server" type="text" class="input1" value="0" /></td>
                </tr>
                <tr>
                    <th bgcolor="#FFFFFF" class="r_bg" style="width: 167px" >
                        描述：
                    </th>
                    <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                  <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Columns="40" Rows="5" onBlur="if(this.value=='')this.value='空'"   onFocus="if(this.value=='空')this.value=''" Text="空"></asp:TextBox></td>
                </tr>
                <tr>
                    <th bgcolor="#ffffff" class="r_bg" style="width: 167px">
                        操作人员：</th>
                    <td width="290" bgcolor="#ffffff" class="right_bg">
                        <asp:Label ID="lblName" runat="server"></asp:Label></td>
                    <td width="124" bgcolor="#ffffff" class="r_bg">&nbsp;操作时间：</td>
                    <td width="389" bgcolor="#ffffff" class="right_bg">&nbsp;<asp:Label ID="lblDate" runat="server"></asp:Label></td>
                </tr>
                <tr>
                    <th bgcolor="#FFFFFF" class="r_bg" style="width: 167px" >                    </th>
                    <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                  <asp:Button ID="btnAdd" runat="server" CssClass="submit" Text=" 提交 "  OnClientClick="return checknull(this.form)" OnClick="btnAdd_Click" /></td>
                </tr>
          </table>
        </div>
    </form>
</body>
</html>
